package com.punai.customer.mapper;

import com.punai.common.core.mapper.CommonMapper;
import com.punai.customer.domain.CusLinkSubpkConsume;
import com.punai.customer.domain.bo.CJFlRes;
import com.punai.customer.domain.vo.CusUpdateConsumeVo;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * 标准费用项材机耗量Mapper接口
 *
 * @author zhx
 * @date 2023-02-02
 */
public interface CusLinkSubpkConsumeMapper extends CommonMapper<CusLinkSubpkConsume>
{
    void updateConsumeById(@Param("id") String id, @Param("companyId")Long companyId,@Param("realityConsume") BigDecimal realityConsume);

    void paddingData(@Param("companyId") Long companyId,@Param("address") String address);

    List<CJFlRes> listConsume(@Param("linkGxFeatureId") String linkGxFeatureId,@Param("address") String address, @Param("companyId") Long companyId);
    int delLinkCategory(@Param("companyId") Long companyId,@Param("gxId") String gxId,@Param("delIds") List<String> delIds);

    int updateConsume(CusUpdateConsumeVo vo);

    int updateDelFlagIsTwo(@Param("id") String id, @Param("companyId") Long companyId);

    int updateDelFlagIsZero(@Param("linkGxFeatureId") String linkGxFeatureId,@Param("gxId") String gxId, @Param("companyId") Long companyId);
//    update cus_link_subpk_consume set del_flag = '0' where link_gx_feature_id = #{linkGxFeatureId} and company_id = #{companyId}

    int updateDelFlagIsZeroAll(@Param("gxId") String gxId, @Param("companyId") Long companyId);
    
    int updateDelFlagIsThreeByGx(@Param("gxId") String gxId, @Param("companyId") Long companyId,@Param("categoriesIds") List<String> categoriesIds);

    int updateDelFlagIsZeroByGx(@Param("gxId") String gxId, @Param("companyId") Long companyId,@Param("categoryIds") List<String> categoryIds);
}
